<%--
  Created by IntelliJ IDEA.
  User: 75230
  Date: 2023-4-10
  Time: 14:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<!-- 网页使用的语言 -->
<html lang="zh-CN">
<head>
    <!-- 指定字符集 -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>修改用户</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/jquery-2.1.0.min.js"></script>
    <script src="js/bootstrap.min.js"></script>

</head>
<body>
<div class="container" style="width: 400px;">
    <h3 style="text-align: center;">修改个人信息</h3>
    <form action="/userServlet" method="post">
        <%--type=hidden  表单元素中存在元素，不会在页面上渲染，而是隐藏   --%>
        <input type="hidden" name="id" value="${user.id}" >
            <input type="hidden" name="action" value="update">

        <div class="form-group">
            <label for="username">姓名：</label>
            <input type="text" class="form-control" id="username" name="username" value="${user.username}"   placeholder="请输入姓名" />
        </div>
        <div class="form-group">
            <label for="password">密码：</label>
            <input type="text" class="form-control" id="password" name="password" value="${user.password}"   placeholder="请输入密码" />
        </div>



        <div class="form-group">
            <label for="email">Email：</label>
            <input type="text" id="email" class="form-control" name="email" value="${user.email}" placeholder="请输入邮箱地址"/>
        </div>

        <div class="form-group" style="text-align: center">
            <a  href="/userServlet?action=findUserById&id=${user.id}"><input class="btn btn-primary" type="submit" value="提交" /> </a>
            <input class="btn btn-default" type="reset" value="重置" />
            <a href="javascript:history.back(-1)"><input class="btn btn-default" type="button" value="返回"/></a>
        </div>
    </form>
</div>
</body>
</html>
